package com.akina.matchsystem.model.enums;

import org.omg.CORBA.PRIVATE_MEMBER;

public enum TeamStatusEnums {

    PUBLIC(0,"公开"),
    PRIVATE(1,"私有"),
    SECRET(2,"加密");


    private  int value;
    public  String text;

    public  static  TeamStatusEnums getStatus(Integer value){
        if(value==null){
            return null;
        }
        TeamStatusEnums[] teamStatusEnums = TeamStatusEnums.values();
        for(TeamStatusEnums statusEnums:teamStatusEnums){
            //这里遍历枚举内的所有状态,返回与参数相同的值
            if(statusEnums.getValue()==value){
                return statusEnums;
            }
        }
        return null;
    }
    TeamStatusEnums(int v,String s){
        this.value=v;
        this.text=s;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
